package com.service.business.otc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.service.business.base.dto.LoginUserSession;
import com.service.core.rest.request.PageRequest;
import com.service.core.rest.response.CommonPageRep;
import com.service.dao.enums.OtcDetailTypeEnum;
import com.service.dao.model.OtcOrder;
import com.service.business.otc.controller.rep.OtcConfigRep;
import com.service.business.otc.controller.rep.OtcOrderDetailRep;
import com.service.business.otc.controller.rep.OtcOrderPageRep;
import com.service.business.otc.controller.req.OtcOrderPageReq;
import com.service.business.otc.controller.req.OrderCreateReq;
import com.service.business.otc.controller.req.OrderTradeReq;
import com.service.dao.model.SysConfig;

import java.util.Map;

/**
 * 场外交易
 *
 * @author xxxx
 * @email xxxx@qq.com
 * @date 2019-11-18 10:15:22
 */
public interface OtcOrderService extends IService<OtcOrder> {


    Integer creatOtcOrder(OrderCreateReq orderCreateReq, int type, Map<String, SysConfig> configMap);

    void tradingOtcOrder(OrderTradeReq orderTradeReq, OtcDetailTypeEnum typeEnum, LoginUserSession userSession);

    OtcOrder getOrderByOrderNo(String orderNo);

    OtcOrderDetailRep getDetail(String orderNo);

    CommonPageRep<OtcOrderPageRep> pageOrder(Integer otcType, PageRequest pageRequest);

    CommonPageRep<OtcOrderPageRep> pageUserOrder(OtcOrderPageReq pageRequest);

    void cancelOrder(String orderNo);

    OtcConfigRep getOtcConfig();
}

